import { createRouter, createWebHashHistory } from "vue-router"

const route = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: '/',
            name: 'hello',
            component: () => import('../view/Hello.vue')
        },
        {
            path: '/main',
            name: 'main',
            component: () => import('../view/catalog/Main.vue')
        },
        {
            path:'/catalog/Product',
            name:'category',
            component: () =>import('../view/catalog/Product.vue')
        },
        {
            path:'/catalog/Item',
            name:'item',
            component: () =>import('../view/catalog/Item.vue')
        },
        {
            path: '/orders/newOrder',
            name: 'newOrder',
            component: () => import('../view/ordersView/newOrderForm.vue')
        },
        {
            path: '/orders/confirmOrder',
            name: 'confirmOrder',
            component: () => import('../view/ordersView/confirmOrder.vue')
        },
        {
            path: '/orders/payForm',
            name: 'payForm',
            component: () => import('../view/ordersView/HelloWorld.vue')
        },
        {
            path: '/orders/paySuccess',
            name: 'paySuccess',
            component: () => import('../view/ordersView/paySuccess.vue')
        },
        {
            path: '/orders/viewOrder',
            name: 'viewOrder',
            component: () => import('../view/ordersView/viewOrder.vue')
        },
        {
            path: '/orders/listOrder',
            name: 'listOrder',
            component: () => import('../view/ordersView/listOrders.vue')
        },
        {
            path: '/catalog/SearchProducts',
            name: 'SearchProducts',
            component: () => import('../view/catalog/SearchProducts.vue')
        },
        {
            path: '/account/myAccountForm',
            name: 'myAccountForm',
            component: () => import('../view/account/myAccountForm.vue')
        },
        {
            path: '/account/registerForm',
            name: 'registerForm',
            component: () => import('../view/account/registerForm.vue')
        },
        {
            path: '/account/signonForm',
            name: 'signonForm',
            component: () => import('../view/account/signonForm.vue')
        },
        {
            path: '/cart/cart',
            name: 'cart',
            component: () => import('../view/cart/cart.vue')
        },

    ]

})

export default route;